package com.example.demo.pojo;


import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;

/**
 * <h3>reqister</h3>
 * <p>角色权限详情</p>
 *
 * @author : chenjunjie
 * @date : 2021-06-25 09:19
 **/
@Getter
@Setter
@ToString
public class RoleDetails implements RowMapper<RoleDetails> {
    public Integer isCheck;
    public Integer id;
    public String ManageName;
    List<RoleDetails> children;

    @Override
    public RoleDetails mapRow(ResultSet resultSet, int i) throws SQLException {
        RoleDetails roleDetails=new RoleDetails();
        roleDetails.setId(resultSet.getInt("menu_id"));
        roleDetails.setIsCheck(resultSet.getInt("is_check"));
        roleDetails.setManageName(resultSet.getString("name"));
        return roleDetails;
    }
}
